import React from 'react';
import { connect } from 'dva';
import { Card } from 'antd';

import styles from './index.less';
import TreeMenu from './Tree';
import Content from './Content';

function FlowConfig(props) {
  return (
    <div className={styles.scroll_main}>
      <div className={styles.scroll_left}>
        <Card className="cute" title="流程目录" style={{ height: props.size.height }}>
          <TreeMenu height={props.size.height} goToStep={props.goToStep} />
        </Card>
      </div>
      <div className={styles.scroll_content}>
        <Card title="流程管理" style={{ height: props.size.height }}>
          <Content height={props.size.height} goToStep={props.goToStep} />
        </Card>
      </div>
    </div>
  );
}

export default connect(({ setting }) => ({
  size: setting.size,
}))(FlowConfig);
